<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%-- 以上JSP指令宣告使用JSTL 1.1的合新標準標籤函式庫 --%>
<%@ page import="java.util.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Member</title>
</head>

<body>
	MEMBER!!!!<br />
	<c:if test=" ${sessionScope.memberList[0] eq 'Mia' }">
		You are Mia... Welcome back Mia...
	</c:if>
	<%-- 無效的 c:if JSTL條件判斷 --%>
	
	<%	
		List m = (List)session.getAttribute("memberList");
		
	%>
	
	<div style="background-color: #EEA9B8;">
		You are <%= m.get(0) %>. Hello <%= m.get(0) %>.
	</div>
	
	<%
		List memberList = (List)session.getAttribute("memberList");
		if(memberList.get(0).equals("Mia")) {
	%>		
	<div style="background-color: #DEB887;">
		You are Mia... Welcome back...
		<% } %>
	</div>
	
	<a href="product/action.do?name=bass&price=231.3&
			name=guitar&price=145.5&
			name=piano&price=6985.33&
			name=drums&price=241.9">
		check our product now
	</a>
</body>
</html>